
package com.roy.spring.demo;


import com.roy.spring.ioc.beanfactory.BeanFactory;
import com.roy.spring.demo.controller.UserController;
import com.roy.spring.demo.model.User;
import com.roy.spring.ioc.iocHelper.IocHelperImpl;


public class TestDemo {

    public static void main(String[] args) {

		// 创建工厂对象，并将配置信息DemoConfig设置进去，工厂对象会自动在后台完成对象装载
		BeanFactory bf = new IocHelperImpl(new DemoConfig());

		UserController uc = bf.getBean(UserController.class);

		uc.add(new User(1, "jack", "123456"));
	}

}


